import hccmRequestUtil from '@/common/hccm-request-util.js'

module.exports = {
  // LOGIN
  getOpenId: param => hccmRequestUtil.getApi('/wx/getOpenId', param, true),

  // 通过手机号获取token
  getToken: param => hccmRequestUtil.postApi('/authentication/getToken', param, true),

  // 获取用户详情
  getPatient: param => hccmRequestUtil.postApi('/patient/getPatient', param, true),

  // 支付
  prePay: param => hccmRequestUtil.postApi('/wx/prePay', param, true),

  // 生成订单
  createOrder: param => hccmRequestUtil.postApi('/order/createOrder', param, true),

  // 生成订单-盛京
  createOrderShengJing: param => hccmRequestUtil.postApi('/order/createOrderShengJing', param, true),


  // 更新订单
  updateOrderByOrderId: param => hccmRequestUtil.postApi('/order/updateOrderByOrderId', param, true),
  
  // 查询订单
  getOrder: param => hccmRequestUtil.postApi('/order/getOrder', param, true),


  // 订单 详情
  getOrderDetail: param => hccmRequestUtil.postApi('/order/getOrderDetail', param, true),
  
  // 京东money
  freightQuery: param => hccmRequestUtil.postApi('/JD/freightQuery', param, true),

  // 退费
  refunds: param => hccmRequestUtil.postApi('/wx/refunds', param, true),

  // 京东详情
  listOrderRoute: param => hccmRequestUtil.postApi('/JD/listOrderRoute', param, true),
  // 省市区
  getArea: param => hccmRequestUtil.postApi('/area/getArea', param, true),

  // 处方列表 省人民
  // getPrescription: param => hccmRequestUtil.postApi('/prescription/getPrescription', param, true), //省人民
  // 处方列表 盛京
  getPrescription: param => hccmRequestUtil.postApi('/prescription/getDrugstorePrescription', param, true), //盛京

  // 获取处方详情
  getPrescriptionDetail: param => hccmRequestUtil.postApi('/prescription/getPrescriptionDetail', param, true),

  // 盛京获取订单信息 prescriptionIds：[],hospId:''
  getOrderByPreIdAndHospIds: param => hccmRequestUtil.postApi('/order/getOrderByPreIdAndHospIds', param, true),

  // 获取地址列表
  getAddress: param => hccmRequestUtil.postApi('/address/getAddress', param, true),

  // 获取地址详情
  getAddressById: param => hccmRequestUtil.postApi('/address/getAddressById', param, true),

  // 更新地址详情
  updateAddress: param => hccmRequestUtil.postApi('/address/updateAddress', param, true),

  // 新增地址
  createAddress: param => hccmRequestUtil.postApi('/address/createAddress', param, true),

  // 删除地址
  deleteAddress: param => hccmRequestUtil.postApi('/address/deleteAddress', param, true),

  // 二维码
  getPrescriptionQRcode: param => hccmRequestUtil.postApi('/prescription/getPrescriptionQRcode', param, true),

  // 根据医院处方id和医院id获取处方（单张处方） 参数是hisPrescriptionId和hospId
  getPrescriptionByHospPrIdAndHospId: param => hccmRequestUtil.postApi('/prescription/getPrescriptionByHospPrIdAndHospId', param, true),

  // 针剂列表
  getDrugstorePrescriptionSTD: param => hccmRequestUtil.postApi('/prescription/getDrugstorePrescriptionSTD', param, true),

  // 龙邦实时数据
  realTimeMeterData: param => hccmRequestUtil.postApi('/open/realTimeMeterData.api', param, true),

  // 针剂详情
  getOrderZj: param => hccmRequestUtil.postApi('/order/getOrderZj', param, true),
}
